import { createApp } from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import myDirective from './directive'
//全局样式列表
import 'element-plus/es/components/message/style/css'
import 'element-plus/es/components/message-box/style/css'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

import { PaginationView, PaginationViewSimple, DragTable, IconSelect, Icon, FilesUpload, SearchCmp } from '@ruifox-cms/components'

//使用mock数据
// if(process.env.NODE_ENV === 'development') require('../mock')

const app = createApp(App)
// 注册全局组件
app.component('PaginationView', PaginationView)
app.component('PaginationViewSimple', PaginationViewSimple)
app.component('RuifoxTable', DragTable)
app.component('IconSelect', IconSelect)
app.component('Icon', Icon)
app.component('FilesUpload', FilesUpload)
app.component('SearchCmp', SearchCmp)
// 注册全局指令
myDirective(app)
app.use(ElementPlus, {
    locale: zhCn
})
app.use(store).use(router).mount('#app')